<%@page contentType="text/html; charset=gbk"%>
<%@page pageEncoding="gbk"%>  
<%@page import="rest.action.front.UserSessionAction"%>
<%@page import="rest.action.front.FrontUserAction"%>
<%@page import="rest.common.util.Tools"%>
<%@page import="rest.common.valueobject.UserSessionInfo"%>
<%@page import="rest.common.util.CachedObject"%>
<%@page import="rest.common.util.CacheManager"%>
<%@page import="javax.servlet.http.*"%>
<%@page import="javax.servlet.ServletContext"%>
<%@page import="javax.servlet.ServletException"%>


<%
	request.setCharacterEncoding ("gbk");
        
	String username = request.getParameter ("username");
	String password = request.getParameter ("password");
        FrontUserAction obj = new FrontUserAction();
   
   
       // boolean result = obj.login(username, password);
          String result = obj.loginNew(username, password);

       
        if (result.equals("1")) {
            
            // Set session
            UserSessionAction userSession = new UserSessionAction();
            userSession.addSessionObject(request);   
        }
        

       
        System.out.println(result);
        obj = null;       
        out.println (result);
        
%>
